﻿using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using DB;

public class ScoreSearch : IScoreSearch
{

    public string singleSearch(string stdid)
    {
        string str_sql = "exec score_singleSearch " + stdid;
        return JsonConvertor.getJsonTable(str_sql);

    }
    public string getScoreByCondit(string stdid, string courseid, string exzamid)
    {
        string str_sql = "exec score_getScoreByCondit " + stdid + "," + courseid + "," + exzamid;
        return JsonConvertor.getJsonTable(str_sql);
    }


    public string getScoreByTerm(string stdid, string term)
    {
        string[] termchange = TermUtils.splitYTerm(term);
        string str_sql = "exec score_getScoreByTerm " + stdid + "," + termchange[0] + "," + termchange[1];
        return JsonConvertor.getJsonTable(str_sql);
    }

    public string getScoreByHistory(string stdid)
    {
        string str_sql = "exec score_getScoreByHistory " + stdid;
        return JsonConvertor.getJsonTable(str_sql);
    }

    public void classSearch()
    {
        throw new NotImplementedException();
    }

    public string getScoreListByExzam(string exzamid)
    {
        string str_sql = "exec score_getScoreListByExzam " + exzamid;
        return JsonConvertor.getJsonTable(str_sql);
    }
    public string getSocreByCourse(string courseid)
    {
        string str_sql = "exec score_getScoreByCourse " + courseid;
        return JsonConvertor.getJsonTable(str_sql);
    }

    public string getScoreByCourseStd(string courseid, string stdid)
    {
        string str_sql = "exec score_getScoreByCourseStd " + courseid + "," + stdid;
        return JsonConvertor.getJsonTable(str_sql);
    }

}
